<!-- wuk-->
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/cloudmgr.css">
<script type="text/javascript" src="<%=basePath%>js/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=basePath%>js/public.js"></script>
<script type="text/javascript" src="<%=basePath%>pages/business/theme.js"></script>
<style type="text/css">
.tableimg{
	
}
</style>
</head>
<body scroll="yes" style="height:545px">
	<div id="tb" style="padding:2px 5px;">
		<a class="easyui-linkbutton operate-button" id="btn_comment">查看回复</a> 
		<a class="easyui-linkbutton operate-button" id="btn_stop">取消置顶</a>
		<a class="easyui-linkbutton operate-button" id="btn_totop">置顶</a>
		<a class="easyui-linkbutton operate-button" id="btn_delete">删除</a>
	</div>
	<table id="datagrid" class="easyui-datagrid"
		data-options="rownumbers : true,title:'',
			singleSelect : false,
			toolbar : '#tb',
			loadMsg : '数据加载中,请稍后...',
			url : '<%=basePath%>theme/queryWebTheme',
			fit:true,
			fitColumns:true,
			pagination:true,
			nowrap:false,
			pageSize: 100,
			pageList : [100, 200],
			method : 'post'">
		<thead>
		<tr>
			<th data-options="field:'title',width:80">标题</th>
			<th data-options="field:'nickName',width:60">昵称</th>
			<th data-options="field:'phoneNum',width:60">手机号码</th>
			<th data-options="field:'isTop',formatter:formatTop,width:60">是否置顶</th>
			<th data-options="field:'topTime',width:60">置顶时间</th>
			<th data-options="field:'firstTime',width:60">发帖时间</th>
			<th data-options="field:'replyNum',width:30">回复数</th>
			<th data-options="field:'content',width:150">文字信息</th>
		</tr>
		</thead>
	</table>
	
	<div id="edit-window">
		<div id="tb2" style="padding:2px 5px;">
			<a class="easyui-linkbutton operate-button" id="btn_delete2">删除</a>
		</div>
		<table id="datagrid2" class="easyui-datagrid"
			data-options="rownumbers : true,title:'',
				singleSelect : false,
				toolbar : '#tb2',
				loadMsg : '数据加载中,请稍后...',
				fit:true,
				fitColumns:true,
				nowrap:false,
				method : 'post'">
			<thead>
			<tr>
				<th data-options="field:'content',formatter:formatContent,width:150">内容</th>
				<th data-options="field:'phoneNum',width:50">手机号码</th>
				<th data-options="field:'replyTag',formatter:formatRep,width:30">是否楼主</th>
			</tr>
			</thead>
		</table>
	</div>
</body>
<<script type="text/javascript">
var baseURL = 'http://localhost:8080/AQAppServer/';
function formatContent(val,row)
{
	var ctype = row.contentType;
	
	if(ctype=='1')
	{
		return '<img style="height:100px" src="' + baseURL + val + '" />';
	}
	else if(ctype=='2')
	{
		return '<div style="border:1px solid green;height:25px;width:120px"><img style="height:25px" src="<%=basePath%>images/yuyin.jpg" /></div>';
	}
	else
	{
		return val;
	}
}
function formatRep(val,row)
{
	if(val=='0')
	{
		return '楼主';
	}else{
		return '其他用户';
	}
}
function formatImg(val,row)
{
	if(val!='')
	{
		return '<img style="height:100px" src="' + baseURL + val + '" />';
	}else{
		return '';
	}
}
function formatTop(val,row)
{
	if(val=='1')
	{
		return '置顶';
	}else{
		return '不置顶';
	}
}
</script>
</html>
